<?php
class sis_combo_model extends MY_Model {
	var $model = 'sis_combo';
	
	function SisSetupJenisPinjaman()
	{
		$ls_sql	= "	SELECT	KODE_JENIS_PINJAMAN value,
							NAMA_JENIS_PINJAMAN display
					FROM	SIS_SETUP_JENIS_PINJAMAN
					WHERE	1 = 1
							AND KODE_JENIS_PINJAMAN IN ('PJM01','PJM03')
					ORDER BY value";
					
		$result	= $this->db->query($ls_sql);
		if($result->num_rows() > 0){
			return $result->result_array();
		}else{
			return array();
		}
	}
	
	function SisSetupSijakaJkw()
	{
		$ls_sql	= "	SELECT	JANGKA_WAKTU value,
							NAMA_JKW display
					FROM	SIS_SETUP_SIJAKA_JKW
					WHERE	1 = 1
					ORDER BY value";
					
		$result	= $this->db->query($ls_sql);
		if($result->num_rows() > 0){
			return $result->result_array();
		}else{
			return array();
		}
	}
	
	function SisSetupSijakaSistemBayar()
	{
		$ls_sql	= "	SELECT	ID_SISTEM_BAYAR value,
							NAMA_SISTEM_BAYAR display
					FROM	SIS_SETUP_SIJAKA_SISTEM_BAYAR
					WHERE	1 = 1
					ORDER BY value";
					
		$result	= $this->db->query($ls_sql);
		if($result->num_rows() > 0){
			return $result->result_array();
		}else{
			return array();
		}
	}
	
	function SistKodeTransSimpanan()
	{
		$ls_sql	= "	SELECT	KODE_TRANSAKSI value,
							NAMA_TRANSAKSI display
					FROM SIS_SETUP_KODE_TRANSAKSI
					WHERE KODE_TRANSAKSI IN ('SS01', 'SS02')
					ORDER BY value";
					
		$result	= $this->db->query($ls_sql);
		if($result->num_rows() > 0){
			return $result->result_array();
		}else{
			return array();
		}
	}
	
	function SistJenisKartu()
	{
		$ls_sql	= "	SELECT	KD_JENIS_KARTU value,
							NAMA_JENIS_KARTU display
                    FROM	SIS_SETUP_JENIS_KARTU
                    WHERE	1=1
                    ORDER BY value";
					
		$result	= $this->db->query($ls_sql);
		if($result->num_rows() > 0){
			return $result->result_array();
		}else{
			return array();
		}
	}
}
?>